Skip to content

ci(qdp): build the extension once and reuse it across the test matrix - #1413

Closed
ryankert01 wants to merge 1 commit into
apache:mainfrom
ryankert01:ci-build-qdp-once
Closed

ci(qdp): build the extension once and reuse it across the test matrix#1413
ryankert01 wants to merge 1 commit into
apache:mainfrom
ryankert01:ci-build-qdp-once

Conversation

@ryankert01

Copy link
Copy Markdown
Member

Related Issues

Changes

  • CI/CD pipeline

Why

The Python Testing workflow rebuilt the QDP extension independently in every
matrix leg (3.10 / 3.11 / 3.12), compiling the same Rust code three times. The
legs run in parallel, so this duplicated CI compute (billed minutes) without
buying any wall-clock speedup.

How

  • Add a build job that compiles the CPU / no-CUDA stub wheels for all
    supported interpreters once and uploads them as an artifact.
  • Rewire the test matrix to needs: build: it downloads the artifact and
    installs the wheel matching each leg's interpreter instead of recompiling.
  • QDP_NO_CUDA=1 makes the stub build explicit, matching the prior per-leg
    behaviour (which fell back to stubs because nvcc is absent on the runner —
    see qdp/qdp-core/build.rs and qdp/qdp-kernels/build.rs).

Net effect: the heavy non-pyo3 crates compile a single time instead of once per
leg. The rust-check gate, the test environment setup, and the pytest
invocation are otherwise unchanged. The CUDA wheel build in wheel-build.yml
(used for distribution) is intentionally left as-is.

Job graph: rust-check → build → test (matrix).

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes

The Python Testing workflow rebuilt the QDP extension independently in
every matrix leg (3.10/3.11/3.12). Add a single `build` job that compiles
the CPU/no-CUDA stub wheels for all supported interpreters once, uploads
them as an artifact, and have the test matrix download and install the
matching wheel instead of recompiling.

QDP_NO_CUDA=1 makes the stub build explicit, matching the prior per-leg
behaviour (which fell back to stubs because nvcc is absent on the runner).
This removes the duplicated compilation across the matrix; the heavy
non-pyo3 crates now compile a single time.
@ryankert01
ryankert01 requested a review from 400Ping as a code owner June 26, 2026 18:47
@ryankert01

Copy link
Copy Markdown
Member Author

Not effective

@ryankert01 ryankert01 closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant